home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Floppyshop 2
/
Floppyshop - 2.zip
/
Floppyshop - 2.iso
/
diskmags
/
5791-.end
/
dmg-6260
/
articles
/
drivlite.doc
< prev
next >
Wrap
Text File
|
1993-06-23
|
2KB
|
60 lines
FLASHING THE DRIVE LIGHT
~~~~~~~~~~~~~~~~~~~~~~~~~~
If you are an ardent demo-watcher, you may have seen some demos which
flash the drive light to the beat of the music. And you may have also
thought, how the hell did they do that? Well, the method is really
quite simple...
An address in memory, $FF8802 contains the current drive light status.
P=PEEK($FF8802)
if P=102, then both lights are off.
if P=104, then both lights are on.
if P=106, then only drive B is on.
if P=108, then only drive A is on.
When I say "both lights are off", I mean drive A and B. There are
probably values which affect the modem as well, but as I do not have a
modem, I cannot tell. If you want to check for other values, simply run
this little program:
10 for T=0 to 255
20 print T
30 poke $FF8802,T
40 wait key
50 next T
Jot down the values which give the best results.
If you want to incorporate drive lights which flash to the music, then
there is a little something which you have to do first. Try the
following program:
10 rem THIS PROGRAM NEEDS SOME MAD MAX MUSIC IN BANK 3
15 :
20 dreg(0)=1 : call 3 : loke $4d2,start(3)+8
30 repeat
40 p=psg(8)
50 if p=15 then poke $ff8802,108 else poke $ff8802,102
60 i$=inkey$ : until i$=" "
70 loke $4d2,0 : silence
80 rem Remove 'silence' if you do not have the MISTY EXTENSION
When you run it, the program does not flash the lights at all. This is
something to do with the PSG $FF8800 not sorting out the contents of
it's address (or something - Help me Billy!) So, to get the lights
working, insert the following line:
45 poke $ff8800,14
This should now be OK. Check out DRIVLITE.BAS on this disk to see what
effects can be achieved with this function. To the best of my
knowledge, flashing the drive lights on and off does not affect the
drive or disk in any way, so don't worry.
Great thanks go to Wheee the Fibble for this chunk of code!
Article: BLACK EAGLE 23/6/93